// import 'core-js/stable'// 基本都引入 polyfill  针对 entry 配置
// import 'regenerator-runtime/runtime';// 基本都引入 polyfill  针对 entry 配置 


// import React from 'react'
// import ReactDom from 'react-dom/client'
import axios from 'axios'
import App from './App.jsx';
const message = 'hello world';
import { sub,sum } from './ts/math.ts'

const foo = (app) => {
  console.log('foo exec',app.length,message.length);
  console.log(sum(app.length,message.length));
  console.log(sub(app.length,message.length));
  console.log('hahahah');
};

foo(message);
// axios.get('/api/users/list').then(res=>{
//   console.log(res.data,'res');
// })

console.log(message.slice(1));
const obj = {
  name:"name",
  age:'age',
  address:"address"
}

console.log('sadas'.includes('a'));

// console.log(new Set([1,23,4,55,32,234,32,4]));

// console.log(new Promise);

const {name,age}=obj;
console.log(name,age);

// const root = ReactDom.createRoot(document.getElementById('app'))
// root.render(<App></App>) 

const btn1= document.createElement('button')
const btn2= document.createElement('button')
btn1.textContent='about'
btn2.textContent='category'
document.body.append(btn1)
document.body.append(btn2)
btn1.onclick=function(){
  import(/* webpackChunkName:"about" */ './router/about.js')
}
btn2.onclick=function(){
  import(/* webpackChunkName:"category" */ './router/category.js')

}
